package com.vhall.component.framework.common.constant;

/**
 * 全局公共常量
 *
 * @author zlt
 * @date 2018/10/29
 */
public final class CommonConstant {

    private CommonConstant() {
        throw new IllegalStateException("Utility class");
    }

    /**
     * 项目版本号(banner使用)
     */
    public static final String PROJECT_VERSION = "1.0.0";

    /**
     * token请求头名称
     */
    public static final String TOKEN_HEADER = "Authorization";

    /**
     * The access token issued by the authorization server. This value is REQUIRED.
     */
    public static final String ACCESS_TOKEN = "access_token";

    public static final String BEARER_TYPE = "Bearer";

    /**
     * 标签 header key
     */
    public static final String HEADER_LABEL = "x-label";

    /**
     * 标签 header 分隔符
     */
    public static final String HEADER_LABEL_SPLIT = ",";

    /**
     * 标签或 名称
     */
    public static final String LABEL_OR = "labelOr";

    /**
     * 标签且 名称
     */
    public static final String LABEL_AND = "labelAnd";

    /**
     * 权重key
     */
    public static final String WEIGHT_KEY = "weight";

    /**
     * 删除
     */
    public static final String STATUS_DEL = "1";

    /**
     * 正常
     */
    public static final String STATUS_NORMAL = "0";

    /**
     * 锁定
     */
    public static final String STATUS_LOCK = "9";

    /**
     * 目录
     */
    public static final Integer CATALOG = -1;

    /**
     * 菜单
     */
    public static final Integer MENU = 1;

    /**
     * 权限
     */
    public static final Integer PERMISSION = 2;

    /**
     * 删除标记
     */
    public static final String DEL_FLAG = "is_del";

    /**
     * 超级管理员用户名
     */
    public static final String ADMIN_USER_NAME = "admin";

    /**
     * 公共日期格式
     */
    public static final String MONTH_FORMAT = "yyyy-MM";
    public static final String DATE_FORMAT = "yyyy-MM-dd";
    public static final String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
    public static final String SIMPLE_MONTH_FORMAT = "yyyyMM";
    public static final String SIMPLE_DATE_FORMAT = "yyyyMMdd";
    public static final String SIMPLE_DATETIME_FORMAT = "yyyyMMddHHmmss";
    public static final String DATETIME_FORMAT_ENDTIME = "yyyy-MM-dd 23:59:59";
    public static final String TIME_ZONE_GMT8 = "GMT+8";

    public static final String LOCK_KEY_PREFIX = "LOCK_KEY";

    /**
     * 租户id参数
     */
    public static final String TENANT_ID_PARAM = "tenantId";

    /**
     * 日志链路追踪id信息头
     */
    public static final String TRACE_ID_HEADER = "x-traceId-header";
    /**
     * 日志链路追踪id日志标志
     */
    public static final String LOG_TRACE_ID = "traceId";
    /**
     * 负载均衡策略-版本号 信息头
     */
    public static final String Z_L_T_VERSION = "z-l-t-version";
    /**
     * 注册中心元数据 版本号
     */
    public static final String METADATA_VERSION = "version";

    /**
     * 文件分隔符
     */
    public static final String PATH_SPLIT = "/";

    public static final String COMMON_RESULT_KEY = "common_result";

    /**
     * 下划线
     */
    public static final String UNDERLINE = "_";

    /**
     * 百分号
     */
    public static final String PERCENT_SIGN = "%";

    public static final String UTF8 = "UTF-8";
}
